alert('drop table ' + this._fullPath + ' ' + e.message); function getUniqueKey(): string { var key = window.location.href;
if (key.length > 'index.html'.length
&& key.slice(key.length - 'index.html'.length).toLowerCase() === 'index.html')
key = key.slice(0, key.length - 'index.html'.length);
function getOpenDatabase() { return typeof openDatabase == 'undefined' ? null : openDatabase;
function safeParseInt(str: string): number { if (typeof str === 'number') return <number><any>str;
function appendScriptElement(doc: typeof document): HTMLScriptElement { var s = doc.createElement('script'); s.setAttribute('type', 'text/data'); doc.body.insertBefore(s, doc.body.children[0]);
function removeScriptElement(script: HTMLElement) { var keepElement: boolean;
if (script.tagName.toLowerCase() === 'style') { else if (script.tagName.toLowerCase() === 'script') { var type = script.getAttribute('type'); if (!type || type.indexOf('javascript') > 0) { if (script.id === 'page-template'
|| script.id === 'folder-template'
|| script.id === 'file-template')
script.removeAttribute('data-path'); script.parentElement.removeChild(script);
function loadPropertiesFromDom(
script: HTMLScriptElement,
executeSql: ExecuteSqlDelegate) { function afterCreateTable(after: () => void) { 'CREATE TABLE "' + tableName + '" ( name TEXT, value TEXT)', [],